\(\def\N{\mathbb{N}}\) \(\def\Z{\mathbb{Z}}\) \(\def\Q{\mathbb{Q}}\) \(\def\R{\mathbb{R}}\) \(\def\C{\mathbb{C}}\) \(\def\H{\mathbb{H}}\) \(\def\6{\partial}\) \(\DeclareMathOperator\Res{Res}\) \(\DeclareMathOperator\M{M}\) \(\DeclareMathOperator\ord{ord}\) \(\DeclareMathOperator\const{const}\) \(\DeclareMathOperator{\arccosh}{arccosh}\) \(\DeclareMathOperator{\arcsinh}{arcsinh}\) \(\DeclareMathOperator\id{id}\) \(\DeclareMathOperator\rk{rk}\) \(\DeclareMathOperator\tr{tr}\) \(\def\pt{\mathrm{pt}}\) \(\DeclareMathOperator\colim{colim}\) \(\DeclareMathOperator\Hom{Hom}\) \(\DeclareMathOperator\End{End}\) \(\DeclareMathOperator\Aut{Aut}\) \(\let\Im\relax\DeclareMathOperator\Im{Im}\) \(\let\Re\relax\DeclareMathOperator\Re{Re}\) \(\DeclareMathOperator\Ker{Ker}\) \(\DeclareMathOperator\Coker{Coker}\) \(\DeclareMathOperator\Map{Map}\) \(\def\GL{\mathrm{GL}}\) \(\def\SL{\mathrm{SL}}\) \(\def\O{\mathrm{O}}\) \(\def\SO{\mathrm{SO}}\) \(\def\Spin{\mathrm{Spin}}\) \(\def\U{\mathrm{U}}\) \(\def\SU{\mathrm{SU}}\) \(\def\g{{\mathfrak g}}\) \(\def\h{{\mathfrak h}}\) \(\def\gl{{\mathfrak{gl}}}\) \(\def\sl{{\mathfrak{sl}}}\) \(\def\sp{{\mathfrak{sp}}}\) \(\def\so{{\mathfrak{so}}}\) \(\def\spin{{\mathfrak{spin}}}\) \(\def\u{{\mathfrak u}}\) \(\def\su{{\mathfrak{su}}}\) \(\def\cA{\mathcal{A}}\) \(\def\cB{\mathcal{B}}\) \(\def\cC{\mathcal{C}}\) \(\def\cD{\mathcal{D}}\) \(\def\cE{\mathcal{E}}\) \(\def\cF{\mathcal{F}}\) \(\def\cG{\mathcal{G}}\) \(\def\cH{\mathcal{H}}\) \(\def\cI{\mathcal{I}}\) \(\def\cJ{\mathcal{J}}\) \(\def\cK{\mathcal{K}}\) \(\def\cL{\mathcal{L}}\) \(\def\cM{\mathcal{M}}\) \(\def\cN{\mathcal{N}}\) \(\def\cO{\mathcal{O}}\) \(\def\cP{\mathcal{P}}\) \(\def\cQ{\mathcal{Q}}\) \(\def\cR{\mathcal{R}}\) \(\def\cS{\mathcal{S}}\) \(\def\cT{\mathcal{T}}\) \(\def\cU{\mathcal{U}}\) \(\def\cV{\mathcal{V}}\) \(\def\cW{\mathcal{W}}\) \(\def\cX{\mathcal{X}}\) \(\def\cY{\mathcal{Y}}\) \(\def\cZ{\mathcal{Z}}\) \(\def\al{\alpha}\) \(\def\be{\beta}\) \(\def\ga{\gamma}\) \(\def\de{\delta}\) \(\def\ep{\epsilon}\) \(\def\ze{\zeta}\) \(\def\th{\theta}\) \(\def\io{\iota}\) \(\def\ka{\kappa}\) \(\def\la{\lambda}\) \(\def\si{\sigma}\) \(\def\up{\upsilon}\) \(\def\vp{\varphi}\) \(\def\om{\omega}\) \(\def\De{\Delta}\) \(\def\Ka{{\rm K}}\) \(\def\La{\Lambda}\) \(\def\Om{\Omega}\) \(\def\Ga{\Gamma}\) \(\def\Si{\Sigma}\) \(\def\Th{\Theta}\) \(\def\Up{\Upsilon}\) \(\def\Chi{{\rm X}}\) \(\def\Tau{{T}}\) \(\def\Nu{{\rm N}}\) \(\def\op{\oplus}\) \(\def\ot{\otimes}\) \(\def\t{\times}\) \(\def\bt{\boxtimes}\) \(\def\bu{\bullet}\) \(\def\iy{\infty}\) \(\def\longra{\longrightarrow}\) \(\def\an#1{\langle #1 \rangle}\) \(\def\ban#1{\bigl\langle #1 \bigr\rangle}\) \(\def\llbracket{{\normalsize\unicode{x27E6}}} \def\rrbracket{{\normalsize\unicode{x27E7}}} \) \(\def\lb{\llbracket}\) \(\def\rb{\rrbracket}\) \(\def\ul{\underline}\) \(\def\ol{\overline}\)

11  Applications to integrals

The residue theorem can be used to compute integrals of functions that do not have an obvious primitive. For this, we first need to find a suitable holomorphic function and contour to which we can apply the residue theorem, which is guesswork. The original integral is often a part of this contour and one shows that the rest of contour integral tends to zero.

We give three examples that illustrate the general technique.

Example 11.1  

Let \(f(z)=\frac{1}{1+z^4},\) which is holomorphic except for poles of order one at all points \(\ze^{1+2k},\) \(k=0,1,2,3,\) where \(\ze=e^{i\pi/4}.\) For \(R>0\) introduce the semi-circular contour \(\eta_R\colon[0,\pi]\to\C,\) \(\eta_R(t)=Re^{it}\) and let \(\ga_R\) be the concatenation of \(\eta_R\) with the real interval \([-R,R],\) parametrized as in Example 6.1.

The residues are \[\Res_{\ze^{1+2k}}(f)=\frac{-\ze^{1+2k}}{4}.\]

When \(R>1,\) the only isolated singularities inside the contour are \(\ze, \ze^3,\) hence \(W_\ze(\ga_R)=W_{\ze^3}(\ga_R)=1\) (more formally, this holds by Example 10.3 and Proposition 10.2) and \(W_{\ze^5}(\ga_R)=W_{\ze^7}(\ga_R)=0\) (more formally, by Cauchy’s Theorem 7.1). By the residue Theorem 10.1, \[\int_{\ga_R}f(z)dz=2\pi i\bigl[W_\ze(\ga_R)\Res_\ze(f)+W_{\ze^3}(\ga_R)\Res_{\ze^3}(f)\bigr]=\frac{\pi}{\sqrt{2}}\]

The contour integral decomposes as \[\frac{\pi}{\sqrt{2}}=\int_{\ga_R}f(z)dz=\int_{\eta_R}f(z)dz+\int_{[-R,R]}f(z)dz\]

and we have \[\int_{-\iy}^{+\iy}f(z)dz=\lim_{R\to+\iy}\int_{[-R,R]}f(z)dz.\]

We claim that \(\int_{\eta_R}f(z)dz\to0\) as \(R\to+\iy.\) We have \(L(\eta_R)=\pi R\) and \[|f(z)|=\frac{1}{|z^4+1|}\overset{}{\leqslant}\frac{1}{R^4-1}\] where the inequality follows by Equation 1.7.

Hence Equation 6.7 implies \(\left|\int_{\eta_R}f(z)dz\right|\leqslant\frac{\pi R}{R^4-1},\) which indeed tends to zero as \(R\to+\iy.\) Putting things together, we get \[\int_{-\iy}^{+\iy}\frac{dx}{1+x^4}=\frac{\pi}{\sqrt{2}}.\]

More generally, we can use the approach above to compute all integrals \(\int_{-\iy}^{+\iy}f(z)dz\) of rational functions \(f(z)=\frac{p(z)}{q(z)}\) with \(\deg(q)\geqslant\deg(p)+2\) and \(q(x)\neq0\) for all \(x\in\R.\)

Integrals made only of trigonometric functions can often be evaluated using the residue theorem and the following method.

Example 11.2  

If \(x\in\R,\) then \(\cos(x)=\frac{z+1/z}{2},\) \(\sin(x)=\frac{z-1/z}{2i}\) for \(z=e^{ix}.\) Using this, we can change variables and use \(dz=izdx\) to rewrite \[\int_0^{2\pi}\frac{\cos(x)^2}{\sin(x)+2}dx=\int_{\6 D_1(0)}\frac{(1+z^2)^2}{2z^2(z^2+4iz-1)}dz\]

as a contour integral, which is evaluated using the residue theorem. The singularities of \(f(z)=\frac{(1+z^2)^2}{2z^2(z^2+4iz-1)}=\frac{(1+z^2)^2}{2z^2(z-z_+)(z-z_-)}\) are at \(z=0\) (pole of order two) and \(z_\pm=-i(2\pm\sqrt{3})\) (poles of order one). Using Proposition 10.1(c), we find that the residues are \[\begin{align*} \Res_0(f)&=\lim_{z\to0}\frac{d}{dz}\frac{(1+z^2)^2}{2(z^2+4iz-1)}=-2i,\\ \Res_{z_-}(f)&=\lim_{z\to z_-}\frac{(1+z^2)^2}{2z^2(z-z_+)}=\frac{(1+z_-^2)^2}{2z_-^2(z_--z_+)}=i\sqrt{3}. \end{align*}\] Now the residue theorem implies \[\int_{\6 D_1(0)}\frac{(1+z^2)^2}{2z^2(z^2+4iz-1)}dz=2\pi i(-2i+i\sqrt{3})=2\pi(\sqrt{3}-2).\]

This example can be generalized to compute integrals over \([0,2\pi]\) of rational algebraic functions of \(\sin(x)\) and \(\cos(x).\)

The following integral was already computed in calculus using polar coordinates in the plane.

Example 11.3  

\(\int_{-\iy}^{+\iy} e^{-x^2}dx=\sqrt{\pi}\)

Let \(a=(1+i)\sqrt{\frac{\pi}{2}}.\) Then \(a^2=i\pi.\) The function \(f(z)=\frac{e^{-z^2}}{1+e^{-2az}}\) is holomorphic except for poles of order one at all points \(a\left(k+\frac12\right),\) \(k\in\Z\) (simple zeros of the denominator). Using the power series expansion of the exponential, we find \[\begin{align*} 1+e^{-2az}&=1+e^{-2a\left(z-\frac{a}{2}\right)}e^{a^2}=1-e^{-2a\left(z-\frac{a}{2}\right)}\\ &=2a\left(z-\frac{a}{2}\right)-\frac{1}{2!}4a^2\left(z-\frac{a}{2}\right)^2+\ldots \end{align*}\] and this gives the residue \[\Res_{a/2}(f) = \lim_{z\to a/2}\frac{e^{-z^2}(z-\frac{a}{2})}{1+e^{-2az}}=\frac{e^{-a^2/4}}{2a}=\frac{-i}{2\sqrt{\pi}}.\]

From \(a^2=i\pi\) it is not hard to check \[f(z)-f(z+a)=e^{-z^2}.\]

Hence the integral over \(z\in[-\iy,+\iy]\) can be computed using the two horizontal parts of the following contour \(\ga_R\) as \(R\to+\iy.\)

The only singularity inside the contour is \(a/2,\) so the residue theorem gives \[\int_{\ga_R} f(z)dz=2\pi i\frac{-i}{2\sqrt{\pi}}=\sqrt{\pi}.\]

The contour integral over \(\ga_R\) splits into four parts. We estimate the vertical parts \(\eta_{\pm R}\) of the integral as follows. Let \(z=x+iy\) with \(x=\pm R\) and \(y\in[0,\sqrt{\pi/2}].\) Then \[|f(z)|\leqslant\frac{e^{-\Re(z^2)}}{1-e^{-\Re(2 az)}}=\frac{e^{y^2-x^2}}{1-e^{\sqrt{2\pi}(y-x)}}\leqslant\frac{e^{\pi/2-x^2}}{1-e^{-\sqrt{2\pi}x}}\]

tends to zero as \(|x|\to+\iy,\) uniformly in \(y\in[0,\sqrt{\pi/2}].\) Hence Equation 6.7 implies \[\int_{\eta_{\pm R}} f(z)dz\xrightarrow{R\to\iy}0\]

and we conclude \[\begin{align*} \sqrt{\pi}&=\int_{\ga_R} f(z)dz\\ &=\int_{-R}^{+R} f(z)dz+\int_{R}^{-R} f(z+a)dz+\int_{\eta_{R}} f(z)dz+\int_{\eta_{-R}} f(z)dz\\ &\xrightarrow{R\to+\iy}\int_{-\iy}^{+\iy} f(z)dz-\int_{-\iy}^{+\iy} f(z+a)dz=\int_{-\iy}^{+\iy} e^{-x^2}dx. \end{align*}\]

References

Dowson, H. R. 1979. “Serge Lang, Complex Analysis (Addison-Wesley, 1977), Xi + 321 Pp., £1200.” Proceedings of the Edinburgh Mathematical Society 22 (1): 65–65. https://doi.org/10.1017/S0013091500027838.
Freitag, E., and R. Busam. 2009. Complex Analysis. Universitext. Springer Berlin Heidelberg. https://books.google.co.uk/books?id=3xBpS-ZKlgsC.
Howie, J. M. 2012. Complex Analysis. Springer Undergraduate Mathematics Series. Springer London. https://books.google.co.uk/books?id=0FZDBAAAQBAJ.
Jameson, G. J. O. 1987. “H. A. Priestley, Introduction to Complex Analysis (Oxford University Press, 1985), 197 Pp., £8.50.” Proceedings of the Edinburgh Mathematical Society 30 (2): 325–26. https://doi.org/10.1017/S0013091500028406.
Remmert, R. 1991. Theory of Complex Functions. Graduate Texts in Mathematics. Springer New York. https://books.google.co.uk/books?id=uP8SF4jf7GEC.
Thomson, B. S., J. B. Bruckner, and A. M. Bruckner. 2001. Elementary Real Analysis. Prentice-Hall. https://books.google.co.uk/books?id=6l_E9OTFaK0C.